package com.mo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
//开启定时任务
@EnableScheduling
@RestController
//设置扫描的包名
//@ComponentScan(basePackages = {"com.mo.modular.search.job"})
@SpringBootApplication
public class MoSearchApplication extends HessianServletInitializer {
    public static void main(String[] args) {
        SpringApplication.run(MoSearchApplication.class, args);
    }

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        registry.addResourceHandler("swagger-ui.html").addResourceLocations("classpath:/META-INF/resources/");
        registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
    }
    
}
